" 编码设置
let &termencoding=&encoding
set fileencodings=utf-8,gbk

" Sets how many lines of history VIM has to remember
set history=50

" Enable filetype plugins
filetype plugin on
filetype indent on

" Set to auto read when a file is changed from the outside
set autoread

" 设置显示行号
set nu

" Tab键的宽度
set tabstop=4

" 统一缩进为4
set softtabstop=4
set shiftwidth=4

"禁止生成临时文件
set nobackup
set noswapfile

" 自动缩进
set autoindent
set cindent

" 打开语法高亮
syntax enable


" 设置背景颜色
set background=dark

" 设置主题
"colorscheme solarized

" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ";"
let g:mapleader = ";"

" Fast saving
nmap <leader>w :w!<cr>

" 强制退出
nmap <leader>q :q!<cr>

" 从插入模式进入正常模式
:imap jk <Esc>